<?php if (!$this->pageCount) return; ?>
 
<div class="kx_pagination">
<!-- Previous page link --> 
<?php if (isset($this->previous)): ?> 
    <a href="<?php echo $this->url(array('page' => $this->previous)) . $this->valuesQuery; ?>">&laquo;</a>  
<?php else: ?> 
    <span class="disabled">&laquo;</span> 
<?php endif; ?> 

<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?> 
    <?php if ($page != $this->current): ?>
        <a href="<?php echo $this->url(array('page' => $page)) . $this->valuesQuery; ?>"><?php echo $page; ?></a> 
    <?php else: ?>
        <span class="selected"><?php echo $page; ?></span>
    <?php endif; ?>
<?php endforeach; ?>

<!-- Next page link --> 
<?php if (isset($this->next)): ?> 
    <a href="<?php echo $this->url(array('page' => $this->next)) . $this->valuesQuery; ?>">&raquo;</a>
<?php else: ?> 
    <span class="disabled">&raquo;</span>
<?php endif; ?>
</div>